﻿<%@ Page AutoEventWireup="true" CodeBehind="Admin_HelpClass.aspx.cs" Inherits="V5_EShop.Admin.Help.Admin_HelpClass"
    Language="C#" MasterPageFile="~/Includes/AdminMaster.Master" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="title">
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="head">
</asp:Content>
<asp:Content ID="Content3" runat="server" ContentPlaceHolderID="content">
    <table cellpadding="0" cellspacing="0" class="tablelist">
        <tr>
            <td class="headertext">
                位置导航：<a class="list_link" href="<%=this.ResolveUrl("~/") %>Admin/Admin_Index_Main.aspx"
                    target="main">首页</a> >> 帮助分类管理
            </td>
        </tr>
        <tr>
            <td>
                <span><a href="?">管理首页</a></span> | <span><a href="?Action=edit">添加帮助分类</a></span>
            </td>
        </tr>
    </table>
    <asp:MultiView ID="MultiViewList" runat="server">
        <asp:View ID="View1" runat="server">
            <asp:GridView ID="gvList" runat="server" OnRowCommand="gvList_RowCommand" CssClass="tablelist overlist rowlist tableheader"
                AutoGenerateColumns="False" GridLines="None">
                <HeaderStyle CssClass="headertext" />
                <Columns>
                    <asp:BoundField DataField="ClassiD" HeaderText="ID">
                        <HeaderStyle HorizontalAlign="Center" Width="30px" CssClass="headertext" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="分类名称">
                        <ItemTemplate>
                            <%# V5.Class.GetColumnListName(Eval("ClassTitle", "{0}"), Eval("ClassCode", "{0}"))%>
                        </ItemTemplate>
                        <HeaderStyle CssClass="headertext" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderStyle CssClass="headertext" HorizontalAlign="Center" Width="150px" />
                        <ItemStyle HorizontalAlign="Center" />
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton6" runat="server" CommandArgument='<%#Eval("ClassID") %>'
                                CommandName="up">升</asp:LinkButton>
                            <asp:LinkButton ID="LinkButton7" runat="server" CommandArgument='<%#Eval("ClassID") %>'
                                CommandName="down">降</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="操作">
                        <HeaderStyle HorizontalAlign="Center" Width="150px" CssClass="headertext" />
                        <ItemStyle HorizontalAlign="Center" />
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton5" runat="server" CommandArgument='<%#Eval("ClassID") %>'
                                CommandName="addsubclass">添加子类</asp:LinkButton>
                            |
                            <asp:LinkButton ID="LinkButton1" runat="server" CommandArgument='<%#Eval("ClassID") %>'
                                CommandName="go">修改</asp:LinkButton>
                            |
                            <asp:LinkButton ID="LinkButton2" runat="server" CommandArgument='<%#Eval("ClassID") %>'
                                CommandName="del" OnClientClick="return confirm('你确定要删除吗?');">删除</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle CssClass="category" />
            </asp:GridView>
            <table border="0" align="center" cellpadding="0" cellspacing="0" class="tablelist">
                <tr>
                    <td>
                        <webdiyer:AspNetPager ID="Pager" runat="server" CustomInfoHTML="共%PageCount%页，当前为第%CurrentPageIndex%页，每页%PageSize%条"
                            FirstPageText="首页" HorizontalAlign="Right" LastPageText="尾页" NextPageText="下一页"
                            OnPageChanged="Pager_PageChanged" PageIndexBoxType="DropDownList" PageSize="20"
                            PrevPageText="上一页" ShowCustomInfoSection="Left" ShowPageIndexBox="Always" SubmitButtonText="Go"
                            TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" AlwaysShow="True">
                        </webdiyer:AspNetPager>
                    </td>
                </tr>
            </table>
        </asp:View>
        <asp:View ID="View2" runat="server">
            <table border="0" cellpadding="0" cellspacing="0" class="tablelist rowlist">
                <tr>
                    <td colspan="2" class="headertext">
                        <asp:Label ID="lblTitle" runat="server" Text="添加分类"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="width: 15%;">
                        分类名称
                    </td>
                    <td>
                        <asp:TextBox ID="txtClassName" runat="server" MaxLength="20" Width="220px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        所属分类
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlClassID" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        分类简介
                    </td>
                    <td>
                        <asp:TextBox ID="txtInfo" runat="server" Height="95px" MaxLength="200" TextMode="MultiLine"
                            Width="300px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <asp:HiddenField ID="hfClassID" runat="server" Value="0" />
                        <asp:Button ID="btnSave" runat="server" Text="添 加 保 存" OnClick="btnSave_Click"  CssClass="ds-btn ds-btn-ok" />
                    </td>
                </tr>
            </table>
            <script type="text/javascript">
                $(function() {
                    $("#<%=this.Form.ClientID %>").validate({
                        rules: {
                        <%=txtClassName.UniqueID %>: 
                        {
                            required: true
                        }
                    },
                    messages:{
                        <%=txtClassName.UniqueID %>: 
                        {
                            required: "分类名称不能为空!"
                        }
                    }
                });
            });
            </script>
        </asp:View>
    </asp:MultiView>
</asp:Content>
